package com.ltedu.user.controller;


import com.ltedu.common.vo.Result;
import com.ltedu.user.service.LoginLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 用户登录日志表 前端控制器
 * </p>
 *
 * @author Jerry
 * @since 2020-12-01
 */
@RestController
@RequestMapping("/user/loginLog")
public class LoginLogController {

    @Autowired
    private LoginLogService loginLogService;

    /**
     * 保存登录日志
     *
     * @param memberId   成员身份
     * @param ip         知识产权
     * @param loginState 登录状态
     */
    @PostMapping("/saveLoginLog")
    public void saveLoginLog(Long memberId, String ip, Integer loginState) {
        loginLogService.saveLoginLog(memberId, ip, loginState);
    }
}

